import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 导入全局样式
import './assets/css/globel.css'

// token加入请求头
import qs from 'qs';
import axios from 'axios'
Vue.prototype.$http = axios
axios.defaults.baseURL = 'http://180.76.111.200:3006'
axios.interceptors.request.use(config => {
  // config.headers.Authorization = window.sessionStorage.getItem('data')
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
Vue.prototype.$qs = qs

// element-ui引入
Vue.use(ElementUI)
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
